import utils.ComponentHandler;
import handler.AboutMe_ComponentHandler;
/*
 * @ClassPath: C:\flashPage\flash_src\templates\aboutMe\as\engine
 * @ClassPackage: engine
 * @ClassName: AboutMe_Engine.as
 * @Classdescription:This class handles is MAIN
 * @author vargaf
 * @Date: 21.08.2008
 * @Time:09:54:31
 * @Mod:
 * @eMail: francis.varga@juwimm.com
 *
 */
class engine.AboutMe_Engine {
	
	private var myLoader:MovieClipLoader		= null;
	private var myListener:Object				= null;
	
	public function AboutMe_Engine(){
		
		myLoader								= new MovieClipLoader();
		myListener								= new Object();
		var scaleNum:Number 					= 100;
	
		
		myListener.onLoadInit = function(target_mc:MovieClip):Void{
			
			trace("Image wurde geladen...");
			
			while(target_mc._height >= 220){
				
				scaleNum -= 2;
				
				target_mc._xscale = scaleNum;
				target_mc._yscale = scaleNum;
								
			};	
			
			trace("Image wurde skaliert...");	
			
			AboutMe_ComponentHandler.getProgressCircle()._visible = false;		
			
		};
		
		myListener.onLoadProgress = function(target:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void {
			
			var percent = 0;
			
			AboutMe_ComponentHandler.getProgressCircle()._visible = true;
			AboutMe_ComponentHandler.getProgressCircle().gotoAndPlay(1);
		    
		};
		
		
		myLoader.addListener(myListener);
		
	}
	
	public function setImage(url:String):Void{
		
		myLoader.loadClip(url, AboutMe_ComponentHandler.getImgIncluder());
		
	}
	
	public function setData():Void{
		
		
		
	}
	
}